package com.zero.commons.data.es.example;

import com.zero.enable.starter.annotation.EnableBean;
import com.zero.enable.starter.annotation.EnableMyX;
import com.zero.enable.starter.service.CounterService;
import com.zero.enable.starter.service.LoggerService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

@SpringBootApplication
//@ComponentScan("com.zero.commons.data.es.example")
@EnableBean
@Slf4j
public class ExampleApplication {


    public static void main(String[] args) {
        ApplicationContext context = SpringApplication.run(ExampleApplication.class, args);

        // 验证我们的bean是否成功注入
        System.err.println("-->"+context.getBean(LoggerService.class));
//        log.info(context.getBean("counterService", CounterService.class));
    }
}
